package day240130;

public class FindNumber {
    public static void main(String[] args) {
        int[] arr = new int[]{10, 50, 30, 70, 80, 60, 20, 90, 40};
        int find = 20;
        int flag = 0;
        int i;
        for (i = 0; i < arr.length; i++) {
            if (arr[i] == find) {
                flag = 1;
                break;
            }
        }
        if (flag == 1){
            System.out.println(i);
        }
        else{
            System.out.println("没有找到");
        }
    }
}
